gusucode.com > 智睿政府网站管理系统 V2.1.0 > 智睿政府网站管理系统 V2.1.0\code\Zhirui\editor\filemanager\connectors\asp\upload.asp
<%@ CodePage=65001 Language="VBScript"%> <% Option Explicit Response.Buffer = True %> <% if trim(request.cookies("ZhiRui")("ZhiRuiAdmin"))<>"" then session("ZhiRuiAdmin")=request.cookies("ZhiRui")("ZhiRuiAdmin") session("ZhiRuiUser")=request.cookies("ZhiRui")("ZhiRuiUser") session("AdminPurview")=request.cookies("ZhiRui")("AdminPurview") End if If trim(session("ZhiRuiAdmin"))="" then Response.Write("<script language=javascript>alert('您的缓存时间已到或为空,请返回重新登录!');this.top.location.href='Admin_Login.asp';</script>") Response.end End if If Request.Cookies("ZhiRui")("Check")<>"ZhiRuiSystem" then Response.Write("<script language=javascript>alert('您的核心认证码错误,请返回重新登录!');this.top.location.href='Admin_Login.asp';</script>") Response.end End if %> <!--#include file="config.asp"--> <!--#include file="util.asp"--> <!--#include file="io.asp"--> <!--#include file="commands.asp"--> <!--#include file="class_upload.asp"--> <% Sub SendError( number, text ) SendUploadResults number, "", "", text End Sub ' Check if this uploader has been enabled. If ( ConfigIsEnabled = False ) Then SendUploadResults "1", "", "", "This file uploader is disabled. Please check the ""editor/filemanager/connectors/asp/config.asp"" file" End If Dim sCommand, sResourceType, sCurrentFolder sCommand = "QuickUpload" sResourceType = Request.QueryString("Type") If ( sResourceType = "" ) Then sResourceType = "File" sCurrentFolder = GetCurrentFolder() ' Is Upload enabled? if ( Not IsAllowedCommand( sCommand ) ) then SendUploadResults "1", "", "", "The """ & sCommand & """ command isn't allowed" end if ' Check if it is an allowed resource type. if ( Not IsAllowedType( sResourceType ) ) Then SendUploadResults "1", "", "", "The " & sResourceType & " resource type isn't allowed" end if FileUpload sResourceType, sCurrentFolder, sCommand %>